package com.group.itms.routes.json;

import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;

import android.util.Log;

public class PostGingerbreadJSONParser extends JSONParser {

        private HttpURLConnection conn;
       
        @Override
        public InputStream getInputStream(String url) throws IOException {
                conn = (HttpURLConnection) new URL(url).openConnection();
                int code = conn.getResponseCode();
                String msg = conn.getResponseMessage();
                Log.i(TAG, "HTTP Response code: " + code + " message: " + msg);
                return conn.getInputStream();
        }

        @Override
        public void release() {
                if (conn != null) {
                        conn.disconnect();
                }
        }


}